<template>
  <div class="container">
    <transition enter-active-class="flipInX">
      <div class="box animated" v-show="isshow">{{count}}</div>
    </transition>
  </div>
</template>

<style lang="" scoped>
  .container {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border: 1px solid #ccc;
  }
  .box {
    width: 100px;
    height: 100px;
    font-size: 32px;
    font-weight: 600;
    color: red;
    line-height: 100px;
    background: green;
    margin: 0 auto;
    margin-top: 50px;
  }
</style>

<script>
export default {
  data () {
    return {
      count: 1,
      isshow: true
    }
  },
  mounted () {
    this.add()
  },
  methods: {
    add () {
      setInterval(() => {
        this.count++
      }, 2000)
      setInterval(() => {
        this.isshow = !this.isshow
      }, 1000)
    }
  }
}
</script>
